﻿<?php  
  
	include_once("conn.php");	
 	    
 
 	$strsql="select * from  tb_user";
	// 执行sql查询
    	$result=mysql_query($strsql, $conn);
	 
	//  •MYSQL_BOTH - 默认  •MYSQL_ASSOC - 关联数组 •MYSQL_NUM - 数字数组
	while ($row = mysql_fetch_array($result ,MYSQL_ASSOC )) 
 	{	
		//printf("ID: %s  Name: %s <br>", $row[0], $row[3]);
	 	$com[]=$row;
	}
	 

	 echo json_encode($com);


     
	if($result) mysql_free_result($result);
	  
    	mysql_close();

?>  
